<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:sec="http://www.springframework.org/security/facelets/tags"
      xmlns:rich="http://richfaces.org/rich">
<ui:composition>

<div class="page_brick"></div>
<table class="top_navbar" cellpadding="0" cellspacing="0" border="0">
<tbody>
	<tr>
		<sec:ifAllGranted roles="ROLE_USER">
			<td>
				<!-- "logoutRequest" is handled by SpringSecurity and is configured in app-prod-security.xml  -->
				<form id="logoutFormId" name="logoutFormName" action="#{request.contextPath}/logoutRequest" method="post">
					<h:commandButton type="submit" value="#{bundle['generic.logout.submit']}" />
				</form>
			</td>
		</sec:ifAllGranted>
		<td>
			<h:outputLink value="http://code.google.com/p/java-education/">PROJECT HOMEPAGE</h:outputLink>
		</td>
		<td>
			<h:outputLink value="http://pef.czu.cz">ČZU PEF</h:outputLink>
		</td>
		<td>
			<h:outputLink value="http://www.jena.cz">JENA</h:outputLink>
		</td>
	</tr>
</tbody>
</table>
<h:form>

<table class="skin_chooser" cellpadding="0" cellspacing="0" border="0">
<tbody>
	<tr>
		<td>
			<strong><h:outputText value="#{bundle['generic.skins.title']}"/></strong>
		</td>
		<td>
			<rich:togglePanel id="skin_chooser" value="#{skinBean.skinChooserState}" switchType="ajax" stateOrder="s,b">
				<f:facet name="s">
					<h:panelGroup>
					<table class="skin_line" cellpadding="0" cellspacing="0" border="0">
						<tbody>
							<tr>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										BlueSky
										<f:param value="blueSky" name="s"/>
									</h:outputLink>
								</td>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										Classis
										<f:param value="classic" name="s"/>
									</h:outputLink>
								</td>
								<td class="control">
									<rich:toggleControl for="skin_chooser" value="#{bundle['generic.skins.more']}" />
								</td>
							</tr>
						</tbody>
					</table>
					</h:panelGroup> 
				</f:facet>
				<f:facet name="b">
					<h:panelGroup>
					<table class="skin_line" cellpadding="0" cellspacing="0" border="0">
						<tbody>
							<tr>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										BlueSky
										<f:param value="blueSky" name="s"/>
									</h:outputLink>
								</td>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										Classis
										<f:param value="classic" name="s"/>
									</h:outputLink>
								</td>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										Deep Marine
										<f:param value="deepMarine" name="s"/>
									</h:outputLink>
								</td>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										Ruby
										<f:param value="ruby" name="s"/>
									</h:outputLink>
								</td>
								<td>
									<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeLocation}.jsf">
										Wine
										<f:param value="wine" name="s"/>
									</h:outputLink>
								</td>
								<td class="control">
									<rich:toggleControl for="skin_chooser" value="...less" />
								</td>
							</tr>
						</tbody>
					</table> 
					</h:panelGroup>
				</f:facet>
			</rich:togglePanel>
		</td>
		<td align="right" width="100%">
			<a4j:commandLink reRender="entireScreen">
				<h:graphicImage value="/images/country_flags/en.png" rendered="#{localeBean.language == 'en'}" alt="English" border="0" styleClass="pic"/>
				<h:graphicImage value="/images/country_flags/en-inactive.png" rendered="#{localeBean.language != 'en'}" alt="English" border="0" styleClass="pic"/>
            	<a4j:actionparam name="language" value="en" assignTo="#{localeBean.language}"/>
			</a4j:commandLink>
			<a4j:commandLink reRender="entireScreen">
				<h:graphicImage value="/images/country_flags/cs.png" rendered="#{localeBean.language == 'cs'}" alt="Čeština" border="0" styleClass="pic"/>
				<h:graphicImage value="/images/country_flags/cs-inactive.png" rendered="#{localeBean.language != 'cs'}" alt="Čeština" border="0" styleClass="pic"/>
            	<a4j:actionparam name="language" value="cs" assignTo="#{localeBean.language}"/>
			</a4j:commandLink>
		</td>
	</tr>
</tbody>
</table>
</h:form>
</ui:composition>
</html>